<extend name="Base/member"/>

<block name="body">
  <div class="user-box shop">
    <h3 class="title">
      我的分销
      <span class="title-right-tip">
        0 成本开店，真正的免费赚钱！
      </span>
    </h3>
  
  <div class="sdp">
    <div class="info">
      <ul class="clearfix">
        <li>
          <p>今日收入<small>(元)</small></p>
          <h4 class="text-danger">{$data.today_finance|default='0.00'}</h4>
          <a href="{:U('Shops/detail', array('uid' => UID))}" target="_blank" class="btn btn-sm btn-positive">我的分销店铺</a>
            <button type="button" id="J_invite_copy" class="btn btn-sm btn-positive">复制链接</button>
            <input type="hidden" name="number" id="input_number" class="form-control J_path" value="{$invite_path}" readonly="true">

        </li>
        <li>
          <p>累计收入<small>(元)</small></p>
          <h4 class="text-danger">{$data.total_revenue|default='0.00'}</h4>
          <a href="{:U('Member/finance/type/sdp_order')}" target="_blank" class="btn btn-sm">收入明细</a>
        </li>
      </ul>
    </div>

    <!-- 操作菜单 -->
    <div class="nav">
      <ul class="clearfix">
        <li>
          <a href="{:U('Shops/manage')}">
            <i class="icon icon-shop"></i>
            <span>店铺设置</span>
          </a>
        </li>
        <li>
          <a href="{:U('Shops/item')}">
            <i class="icon icon-items"></i>
            <span>商品管理</span>
          </a>
        </li>
        <li>
          <a href="{:U('Shops/order')}">
            <i class="icon icon-form"></i>
            <span>订单管理</span>
          </a>
        </li>
        <li>
          <a href="{:U('Shops/stat')}">
            <i class="icon icon-stat"></i>
            <span>店铺统计</span>
          </a>
        </li>
      </ul>
    </div>
  </div>

</div>
  
</block>

<block name="script">
  <script>
      seajs.use('jquery.zclip', function(zclip){
          $('#J_invite_copy').zclip({
              path: '__JS__/lib/zclip/ZeroClipboard.swf',
              copy: function(){
                  return $('.J_path').val();
              },
              afterCopy: function(){ // 复制成功后的操作
                  $.ui.success('复制链接成功！');
              }
          });
      });
  </script>
</block>